14. Coprocessor 0
The ten fields of the Diagnostic register, shown in Figure 14-21, are described below. All fields are read-only (all writes are ignored).
BSIdx: this field defines the entry in the branch stack to be used for the latest conditional branch decoded. Its value is meaningless if the latest branch was an unconditional branch.
DBRC: this field disables the use of the branch return cache (BRC).
BRCV: this field indicates whether or not the branch return cache (BRC) is valid. BRC has only one entry (four instructions).
BRCW: this field indicates whether or not the latest branch (JAL, JALR RX, BGEZAL, BGEZALL, BLTZAL, or BLTZALL) caused a write into BRC. It is not affected by any other type of branch.
BRCH: this field indicates whether or not the latest branch (JR r31 or JALR rx,r31) has a BRC hit. It not affected by any other type of branch.
MP: this field indicates whether or not the latest conditional branch verified was mispredicted.
BPMode: this is a read-write field for branch prediction algorithm control.
012: all conditional branches are predicted not taken
102: all conditional branches are predicted taken
The default mode is 00 on processor reset.
BPState: this field contains the new 2-bit state for a conditional branch after it is verified. It is also used to hold the 2-bit state to read/write when a branch prediction table read/write operation is executed.
BPIdx: this field contains the index to the BPT for BPT read/write/initialization operations, and should contain VA[11:3] of the branch for BPT read/write operations. The upper six bits of the BPIdx field contain the line address for BPT line initialization operations; the lower three bits of BPIdx are ignored.
BPOp: this field indicates the following BPT operations:
102: initializes BPT line to all zeroes (strongly not taken)
112: initializes BPT line to all ones (strongly taken).
Figure 14-21 shows the format of the Diagnostic register.
Figure 14-21 Diagnostic Register Format